package nl.scalasim
package actors
package citizenactivities

/**
 * Activity for a citizen without a home or workplace.
 *
 * @author Yigal Duppen
 * @since Oct 28, 2010
 */
class IdleActivity(val citizen: Citizen) extends Activity {

  def activate = {
  }

  def handleAct = {
    citizen.house match {
      case null => done()
      case h => {
        citizen.currentActivity = citizen.commuting
        citizen.commuting.nextActivity = citizen.atHome
        citizen.addressBook.choreographer ! MoveTo(citizen, h)
        done()
      }
    }
  }

}


